package chatsystem;

import gui.ChatGUI;
import modelcontroller.ChatController;
import modelcontroller.ChatModel;
import network.ChatNI;

/**
 *
 * @author Mariam
 * @version 1.1
 * 
 */
public class ChatSystem {

    private ChatGUI gui;
    private ChatController controller;
    private ChatModel model;
    private ChatNI ni;

    private ChatSystem() {
        this.model = new ChatModel();
        this.gui = new ChatGUI(model);
        this.ni = new ChatNI(model);

        this.controller = new ChatController(model, gui, ni);
        this.gui.setController(controller);
        this.ni.setController(controller);
        model.addObserver(ni);
        model.addObserver(gui);
    }

    public static void main(String[] args) {
        ChatSystem cs = new ChatSystem();
    }
}
